/*
 * $Id: SimpleTest7.java 3 2007-12-07 01:24:30Z rasan.rasch $
 *
 * Copyright (c) 2002-2006 UC Regents
 * 
 * Permission to use, copy, modify, distribute, and sell this software and
 * its documentation for any purpose is hereby granted without fee, provided
 * that (i) the above copyright notices and this permission notice appear in
 * all copies of the software and related documentation, and (ii) the names
 * of the UC Regents and the University of California are not used in any
 * advertising or publicity relating to the software without the specific,
 * prior written permission of the University of California.
 * 
 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
 * 
 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY
 * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY
 * THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE
 * OR PERFORMANCE OF THIS SOFTWARE.
 */

package org.cdl.noid;

import java.io.*;
import java.util.ArrayList;
import java.util.regex.*;
import junit.framework.*;

/** 
 * Equivalent to noid5.t. 
 * 
 * @author  Michael A. Russel
 * @author  Rasan Rasch (rasan@nyu.edu)
 * @version $Revision: 3 $
 */
public class SimpleTest7 extends TestCase {

	public SimpleTest7(String name) {
		super(name);
	}
	
	protected void setUp() {
	
	}

	public void testFoo() {

		ArrayList<String> output = new ArrayList<String>();
		TestUtil.checkNoidDir();
		
		TestUtil.execNoid("bind set 13030/tst594 element value", output);

		assertEquals("at least one line of output from attempt to bind to an unminted id",
			output.size() >= 1);

		assertEquals("disallowed binding to unminted id",
			"error: 13030/tst594: \"long\" term disallows binding an unissued identifier unless a hold is first placed on it.",
			(String) output.get(0));
	
	}

}
